// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init()
const db = cloud.database();
// 云函数入口函数
// 删除订单
exports.main = async (event, context) => {
  const wxContext = cloud.getWXContext()

  const id = event.id;
  const result = await db.collection("order").doc(id).remove();



  return {
    code:200,
    msg:"删除成功"
  }
}